﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data.Common;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using System.Data.Entity.Infrastructure;
using DLM.Domain.Model;

namespace DLM.Data.EF.CodeFirst.Mapping
{
    public class RemarkMap:EntityTypeConfiguration<Remark>
    {
        public RemarkMap()
        {
            this.HasKey(t => t.RemarkID);
            this.ToTable("Remark");
            this.Property(t => t.RemarkID).HasColumnName("RemarkID");
            this.Property(t => t.PartyID).HasColumnName("PartyID");
            this.Property(t => t.Content).HasColumnName("Content").HasMaxLength(100);
            this.Property(t => t.UserID).HasColumnName("UserID");
            this.Property(t => t.Rate).HasColumnName("Rate");
            this.Property(t => t.CreateDate).HasColumnName("CreateDate");
            //this.Ignore(t => t.Id);
        }
    }
}
